import { createSlice, PayloadAction } from "@reduxjs/toolkit";

const appStore = createSlice({
  name: "app",
  initialState: {
    userName: "admin",
  },
  reducers: {
    setUserName: (state, action: PayloadAction<string>) => {
      state.userName = action.payload;
    },
  },
});
export const { setUserName } = appStore.actions;
export default appStore.reducer;
